package com.xzc.lease.web.admin.mapper;

import com.xzc.lease.model.entity.ApartmentInfo;
import com.xzc.lease.web.admin.vo.apartment.ApartmentItemVo;
import com.xzc.lease.web.admin.vo.apartment.ApartmentQueryVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

/**
* @author 徐生
* @description 针对表【apartment_info(公寓信息表)】的数据库操作Mapper
* @createDate 2023-07-24 15:48:00
* @Entity com.xzc.lease.model.ApartmentInfo
*/
public interface ApartmentInfoMapper extends BaseMapper<ApartmentInfo> {

    /**
     * 根据条件分页查询公寓列表
     * @param page
     * @param queryVo
     * @return
     */
    IPage<ApartmentItemVo> pageItem(Page<ApartmentItemVo> page, ApartmentQueryVo queryVo);

    /**
     * 根据roomId查询所属公寓信息
     * @param id
     * @return
     */
    ApartmentInfo getByRoomId(Long id);

    /**
     * 根据租约信息id 查询公寓信息
     * @param id
     * @return
     */
    ApartmentInfo getByLeaseAgreementId(Long id);
}




